package previous.Test_0331;

import java.util.Scanner;

/**
 * Created with Intellij IDEA
 * Description:
 * User: 星辰
 */
public class Bridge_Blue {
    //冶炼金属
    public static void main1(String[] args) {
        Scanner scan = new Scanner(System.in);
        //在此输入您的代码...
        int n=scan.nextInt();
        int min=Integer.MIN_VALUE;
        int max=Integer.MAX_VALUE;;
        for(int i=0;i<n;i++){
                int A=scan.nextInt();
                int B=scan.nextInt();
                int Vmax=A/B;
                int Vmin=A/(B+1)+1;
                if(Vmax<max){
                    max=Vmax;
                }
                if(Vmin>min){
                    min=Vmin;
                }
            }
            System.out.println(min+" "+max);
            scan.close();

    }
    //分巧克力
    public static void main2(String[] args) {
        Scanner scan = new Scanner(System.in);
        //在此输入您的代码...
        int n=scan.nextInt();
        int k=scan.nextInt();//人数
        int[] h=new int[n];
        int[] w=new int[n];
        for(int i=0;i<n;i++){
                h[i]=scan.nextInt();
                w[i]=scan.nextInt();

        }
        int left=1;
        int right=100000;
        while(left<right){
            int mid=(left+right+1)/2;
            int count=0;
            for(int i=0;i<n;i++){
                //一共能分多少块
                count+=(h[i]/mid)*(w[i]/mid);
            }
            if(count>=k){
                left=mid;
            }else{
                right=mid-1;
            }
        }
        System.out.print(left);
        scan.close();
    }
}
